Merged in run-wait changes