fix NPE in cookies
Merge pull request #22 from p1tz/master

merge