Fixed all compiling errors