Run for generator objects and fixing of error handling