fixed type error in template