retract and archive fixed template bug