fix the bug for iOS 6