Proper fix for NIO channels