Fix deprecation notices.