added invalid state
Merge pull request #6 from topcoat/error

added invalid state