fix crash on ios6