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