deprecation warning fix