cookie setting bug fixed