Fixes crash on iOS 5.