resolve some type mismatching errors
type fixes