modification for compile error on Mac