Fix error with template