OMG think I just found it....
There was no ENDIF on the end of the 23rd group.
Still testing but I'm sure thats it.