fix test, improve build