remove extra parens
Use onActionSuccess when changing function stack to prevent exceeding the js stack size. onActionSuccess makes the next call in a setTimeout so it starts a new stack rather than adding to the existing one.