Fix beautify for infinity