fixed type bugs