cookie only works in case scope