Fixing bug in prettyprint