fix deprecation warnings