Fix status detecting
Merge pull request #113 from petrukhin/status-fixes

Fix status detecting