Deprecation warning fixes.