previous patch works but this one actually removes the deprecation warning