preserve default ports if no input

fix #189