Fixed sorting to support lower-case