Fixing async_input.

Apparently `read` returns null if you ask for too much data.