Avoid calling window.onload twice