Fix event not triggering on the element