Fix pretty-printing and fix the pretty-printing test.