Optimizing the stability of the XP DEUS 2 metal detector