fixed an index error triggering ArrayIndexOutOfBoundException for an add after a clear if size has grown