Another attempt at getting ports to sort