Fixed potential divide by zero