Fix bug where port auto-choosing is broken (#137)