window.onload is fired too late