Find network port misc fixes

Correct a few things that looked a little suspicious while reviewing code trying to find out why a Jenkins build had failed