Bug fix in Taskgroup handler

If loop is = 0 then loop-1 was obviously going to fail on this switch.
this "should" resolve the matter, though it will have to be looked at
later