Fixed sort behavior