How Einstein saved magnet theory