Added logic to split the port range.