fix tests and build