kqueue support bugfixes