Async code patching