fix log10(0) bug