added check for closed class on collapsable panel