Bugs fixed in printing outputs.