Fix to ajax events