fix all compiling errors