Fixed compiling errors