fixed bug in tuple elimination