Fix crash on iOS8.