Fixed for Xcode 5 and ios 7