fixed bug in pretty printing