Make changes discussed in https://github.com/AlekSi/nut/issues/28