xcode compatibility fix