Fix dispatching of load events