Fixed tabClass

corrected issues causing nullPointerExceptions and
arrayOutOfBoundsExceptions.