fix problem on iOS 5+