fixed compiling bug under mac