fix blocking on I/O stuff