fixed compiler error on Mac