Correcting bug from Templates.hs