Crash fix for iOS7