Fix OS X issues.