A study of magnetic-deflection errors