Couple of bugs in IOCP subsystem fixed.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>