Fixed some bugs of pretty printer