Fixed template update issue