Added support for collapsed mode