Fixed an off by one bug in the tuple utils,