fixed type conversion issues