format port num and fix misc issue

Signed-off-by: Banglang Huang <banglang.huang@gmail.com>