Remove some deprecation warnings