fixed the bug of trying to modify the element of tuple