Fix for iOS6 compatibility.