Fix for iOS 6 compatibility.