fixed some compiling bugs