fix broken tests and build process