fixed the issue with generating tuples