Fix to clearFragments() routine