bugfix with cookies