fix 'sort' to be handled