Fix to read template