Added some type fixes