fixed some error on ios
Merge pull request #1 from vernonwang/master

fixed some error on ios