Fix NIO constructor issue