Superconducting shields are commonly used to suppress external magnetic interference. We show, that an error of almost an order of magnitude can occur in the coil factor in realistic configurations of the solenoid and the shield. The reason is that the coil factor is determined by not only the geometry of the solenoid, but also the nearby magnetic environment. This has important consequences for many cryogenic experiments involving magnetic fields such as the determination of the parameters of Josephson junctions, as well as other superconducting devices. It is proposed to solve the problem by inserting a thin sheet of high-permeability material, and the result is numerically tested.