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