fixed potential divide by zero.