Fixed getting the port value bug