fixed state restoration crashing on iOS 5 (not available)
Merge branch 'develop'