Fixes some deprecation issues.