fix window.onload