fixed video bug by adding template granularity