some fixes in printing