fix the bug that will cause crash in iPad which is running iOS8.