Fixed some type setting problem.