Fixing bug for iOS 7