fixed a compiling error on mac