bugfixes to make it work with latest dependencies