Fix a crash in iOS6