Bug fix of transition event which was firing twice in some cases