Fix ordering with manual selection and two way relations