Fix one use of generators