fixed the timeout handling in the kqueue implementation
tests