fixing deprecation errors