Fixed event listener order