fix bug in printer