Fixing occasional divide by zero error.