Prevent panic when dividing through zero