minor sorting fixes
minor sorting fixes