Fix edit template generalization