fixed crash for ios 5