only collapse header if its expanded