Fix several deprecation notices