Contacts are not sorted correctly