fix some deprecation warnings