Fix the crash on ios 7