fixed divide by zero