fix minor errors
fix build errors; fix build script