Updates to collapse-when directive