Fix crash on iOS5.

Fix crash on iOS5.