Division by zero prevention template not functioning

That did the trick. Thanks.