fixes #1, SORT_REGULAR gave completely unpredictible results while SORT_STRING gives what we expect
fixes #2, make sure the menalto identifier exists before using it