Added a check on transitionEnd callback to only call the callback once