Added support for sorting subitems