Fixes to remove deprecation warnings.