Fixed possibly error with undefined array index on statgen

Implemented check to see if the array was more than one item long