'window not defined' bug-fix.
'window not defined' bug-fixes.