Fixed some minor bugs and print issues