Fixing issue with log10 when 0 is passed in