fix indent and type conversion