Fix deprecation warnings for master