fix deprecations and warnings