Remove possible devision by zero (coverity fix)