Fixed the state selector issue. States now return correctly when being selected and the case doesn't matter.
Merge branch 'master' into selector_fixes