avoid potential div by 0 when running with -n