Fixed bug in printouts