Fix bugs of port display and server response