fix sorting comparitors