Fix deprecation notices