Fix edit tamplate