fixed compilation bug on Mac