Attempt to fix deprecation errors.