Fixed compatibility with iOS 5.0.1