fixed type coersion errors