Fix bag with generator index