Async calls are not performed correctly when executed from sync block (fixes #624)