Fix undrying templates issue