fix the sw type bug