Fixed errors with some templates.