fix some depcrecation warnings