Make sure statuses are set before unsetting them and check mode permission
Merge pull request #71 from Heufneutje/fix-status-modes

Make sure statuses are set before unsetting them and check mode permission