Fixed computation of factors