deprecation warnings fixed