Fixed bug in the printing mode