fixed type inference problems