In one aspect, a computer-implemented method corrects a multi-sphere head model used in dipole localization for a set of magnetic field sensors (MEG sensors) by replacing ghost spheres with replacement spheres that are not ghost spheres. One type of ghost sphere completely encloses the brain volume but is so large that a center of the sphere is outside the brain volume. Another type of ghost sphere lies entirely outside the brain volume. Various approaches for correcting ghost spheres are disclosed.