fix compiler warning for mac