fixed type conversion warnings