Fixing compiling errors