removed multiple window.onload in production