Fixed some type mismatches