fixes in printProblem() method