add -port option
fix comparing signed with unsigned warning