fixed compiler warnings on OS X