Fix onload event