fix js cookie error