fix tests and remove deprecation warning