Fixed cookie setting issue