fix bug on log cookie