Converted gw port to an integer and caught a previously uncaught error