Revert "Removed deprecation warnings."

This reverts commit 590fe440a48bc5dcb0f4a2d4d6e348c634d32f89.