Fixed a bug in printer.