Fixed two comparison bugs

Fixed Bugs:
- Comparison stopped after first character not found in collation table
- Shorter string does not come first if otherwise equal