Fixing to_f issue adding extra characters