Fixed reference to window to print