Fix potential division by 0 if nfactor is not set