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
There's only two difficult problems in software engineering - cache coherency, naming things, and off by one errors.

Update forthcoming.