fix run time crash on iOS6