Fix onloadend even more