fix floating point conversion