Fixed some type conversion warnings