Fix pretty-printer of rational numbers. #153.
Fixed #189.