Fix handling of async requests.

Fixes #435. Closes #436.