Fixing advanceOn function on IE10 and 11