fixed some compiling errors.