Fix window.onload confict