Further fixing deprecation errors