Fix port checking code preventing startup directly after a SG restart
Merge pull request #101 from adam111316/feature/FixPortChecking