Fixed the cookie problem