fix deprication warning