Check hash in viewer constructor.
Fix #229
Fix #176
Merge pull request #255 from avandecreme/master

Check hash in viewer constructor.