fix port parsing issue