Fixed crash when using state setters.
Merge pull request #4 from ChrisGrant/ios8

Ios8
Merge pull request #204 from ChrisGrant/master

Bug fixes.