Fix bug for iOS 7