Resolves issue with nut.sh

Resolve an issue with nut.sh.

Please note that I'm not too familiar with how these scripts work and did not have to test this on a live system. I merely ported my changes that I manually made to nut.sh to the script.