Fixed build and tests