Added fix to window load