Delete templateAtom at the end og grounding rule