changed the priority of the event listener to be call as late as possible