I forgot to increment the variable caseNum. -.- facepalm