Fix small issues described at https://github.com/yvasiyarov/nut/commit/590bc49ef1a45eaf3577dcc7cbb2d4e019135a05#commitcomment-3160333