fix some compiling bugs