Magnetism bug fixes