Add divide by 0 guard.