fix iOS 5 crash; close #9