Fixed index out of bounds error on improperly formatted chet input