Fixes Warning (division by zero) in view.php