minor fixes to sidebar item sorting