Fix deprecation warnings, part 2