reverting back to 'on transitionend hack' because layoutComplete doesn't work as supposed to