bugfix: expansion is done for non-subitems not the other way around (duh)
sorting on subitems