Fix a runtime error related to "cannot join tuple and generator".