need a better cookie workaround