Fixed prettify method