Correct bug in printing solutionsand hints in TeX mode