Generic type fixes