Hack fix to prevent window.print() from firing before the page is ready. Fix a situation where print() could fire twice