Fix crash on iOS7 devices