bug in tuple unpacking