move run nowait out of inner loop

run(nowait) shouldn't be called in a callback, since
run is already running.