fix crash on iOS6