Fix remaining deprecation warnings

Commit d552328801d4ab207c761c0486d3b4330a2e7b82 already fixed most
deprecation warnings, but a few were overlooked.