fixed type bug in preprocess