fix typo in sortById