Handle maxiter=0 as a special case