Moved a couple of variable declarations outside of a loop instead of inline and it seems to have gotten rid of the INTERNAL COMPILER ERROR.