Ensure all ports are converted to integers