fixed a few compiling errors