avoid logs of 0