Re-enable deprecation warnings and fix deprecated warning.