fixed bug in printouts