fix crash bug when specifying custom server port
Merge pull request #202 from jrenner/master

fixed crash bug related to custom port with '-p' arg