fix edit contract templates