Fix remaining deprecation warnings

Commit d552328801d4ab207c761c0486d3b4330a2e7b82 already fixed most
deprecation warnings, but a few were overlooked.
Merge pull request #26 from red-trela/fix-remaining-deprecation-warnings

Fix remaining deprecation warnings