Fixes deprecated warnings

Fixes deprecated warnings