bug fix in write cookie
version