fix warnings on Mac OSX