Add more fixes, fix test environment.