Fix deprecation warns