Fixes issue #19 CancelledKeyException not handled.