fixed compiling bugs