regression test for div by 0 in template
fix for div by 0 error