Fix setTimeout calls

Right now the code is calling setTimeout(callback(...), 0) which is the
same as setTimeout(undefined, 0). The setTimeout is critical because
control flow code assumes that the callbacks won't fire until all the
code in the loop is finished.