Fix allowing ranges of ports to be entered