Added missing function call to for sort order check