fix consumer loop