Fixed bug in centerPrint