closed #3290: Patch for that onEnter's order is wrong