fixed bug preventing cookies from sticking