Fix element listeners order