Correcting misplaced commas in template