Add some restrictions to the channels hashes, closes #77
Fix state change error