fix crash for ios6