fix for issue #551 "Print window is crashing in the middle of all prints"
Merge fix.