Fixes deprecated warnings
Merge pull request #6666 from ricardoquesada/fix_deprecated_warnings

Fixes deprecated warnings