Fixed miscellaneous type errors