Fixed Xcode compile issues