various type fixes