protect calls to cookies hash

[Fixes #4]