Fix for valid socketfd == 0
Stupid bug in inactive-mode fixed