Quick bugfix, tested with up to 5 different thresholds
The list was malformed when thresholds were bigger than 1, it has been
properly tested and run now