Fixed some type issues