Fix an error caused by division by zero in some cases with views system.
Fix an error caused by division by zero in some cases with views system.

mattn/godit,henrylee2cn/godit,nsf/godit,lcaballero/godit