Improved tuple handling