Fixed a tiny error in view-distance calculation