Fixed model dependency in the temlate class.