fix window onLoad