fixed a bug of setting cookies