slightly more reliable deprecation workaround