fix model type bug.