Fix deprecation issue