Fix deprecation warnings

tested manually