Fixed custom sorting when using uppercase letters