Correcting float conversion and formatting of text