updated other places that es is cleared to also clear templates