correct sorting of strings