Fix multiple attaching window load handler