fix derivitive family removal and add counter