Some type fixes