fix port number displayed as None (fix #30)