fixed loading events from ajax