fixed compile error on mac