fixed compiling errors