fixed type parsing bug