Moved work factor incrementation to fix correct number of iterations.