Fix cookie bugs.