Fix an issue in cookies manager