fixed compiler issues for osx