fixes to sorting