fixing compiling errors