Fix bug in collapsing rows