fixed broken collapsenames behavior