Fix for port allocation errors during tests
Merge pull request #594 from knusbaum/port-allocation-fix

Fix for port allocation errors during tests