deprication warning fix