Fix window document on load