Ensure port is retrieved as int