fixed a bug in instantiating the printer.