fixes deprecation warnings