attempt to fix detection of MAGMA