Fixed DeprecationWarnings.