Fixed printing and dialog issues