Fixed crash on ios 6