Bug fix

Fixed cookie setting bug.