Text clearing issue- game breaking

Once again, I must turn to the community for help. I am creating a text adventure, and am encountering a severe problem. Code:

 #pragma strict
    //Keywords and keyword bools.
    private var examineWords= ["examine", "Examine","examine room","Examine room","check room","Check room", "look" ,"Look","Look around","Look around","Inspect","inspect","inspect room", "Inspect room"];
    private var exitWords= ["exit","Exit","leave","Leave","Exit room","exit room","Leave room","leave room","open door","Open door"];
    private var keyWords=["get key","Get key","Pick up key", "pick up key","Grab key","grab key","Grab","grab","take key","Take key"];
    private var isExamineOnList : boolean=false;
    private var isExitOnList : boolean=false;
    private var isKeyOnList : boolean=false;
    //Text box bools.
    private var showBox1 : boolean = true;
    private var showExamine1 : boolean=false; 
    private var showBox2 : boolean=false;
    private var showExamine2 : boolean=false;
    private var showKey2 : boolean=false;
    //Misc.
    var arcadeText : GUIStyle;
    var stringToEdit : String = "";
    
    
    	function OnGUI (){
    	//Return functionality.
    		var returnHit = (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Return);
    		stringToEdit = GUI.TextField (Rect (19, 397, 600, 20), stringToEdit, 240, arcadeText);
    	
    		 if(returnHit) {
    Return();
    
        
        }
        //Light room desc 1.
        if (showBox1 == true)
        
       {GUI.Box(Rect(0,0,Screen.width,Screen.height),"Greetings, Adventurer. You have but one goal: to return to reality.

You are in a low-lit stone room with a single unlocked door visible.", arcadeText);}
//Light room desc 2.
if (showBox2== true)

        {GUI.Box(Rect(0,0,Screen.width,Screen.height),"The next room you enter is an intersection, with one path branching forward and

one right, with a locked door blocking each. To the left hangs a rusted but still
functional key on a chain. As soon as you enter, the door behind you slams shut,
fusing itself to the wall. You must press on. You see footprints matching yours
on the floor. Have you done this before?", arcadeText);}
//for statements
for each (var word1 in examineWords){if (word1==stringToEdit){isExamineOnList=true;}
}

      for each (var word2 in exitWords) {if (word2==stringToEdit){isExitOnList=true;} 
    		}
      for each (var word3 in keyWords) {if (word3==stringToEdit){isKeyOnList=true;}
      }
      
    	//Box 1 ifs.	 
    	if (isExamineOnList==true && returnHit && showBox1==true) {showBox1=false; showExamine1=true;}  	
    	if (showExamine1==true){GUI.Box(Rect(0,0,Screen.width,Screen.height),"Upon further inpection, the craftmanship looks ancient, with moss growing in

some places. Dripping water and cool air suggests a deep climate, and the light
has no visible source.", arcadeText); ExamineBox1();}
if (isExitOnList==true && returnHit && showBox1==true) {showBox1=false; BoxWait();}
//Box 2 ifs.
if (isExamineOnList==true && returnHit && showBox2==true) {showBox2=false; showExamine2=true;}
if (showExamine2==true) {GUI.Box(Rect(0,0,Screen.width,Screen.height),"This room is nearly identical to the last. The rusted key appears to be in
working order. There is no trace of the previous room, and the door appears as
hard as the surrounding stone. The footprints are indeed a perfect match to
your own. Each corridor is locked firmly. Perhaps the key could do the trick… ", arcadeText); ExamineBox2();}
if (isKeyOnList==true && returnHit && showBox2==true) {showBox2=false; showKey2=true;}
if (showKey2==true) {GUI.Box(Rect(0,0,Screen.width,Screen.height),“Key acquired. Try using it!”, arcadeText); KeyBox2();}
}
function Return () { stringToEdit = stringToEdit; yield WaitForEndOfFrame; stringToEdit= “”;}
function BoxWait(){yield WaitForSeconds(1.0); showBox2=true;}
function ExamineBox1(){
yield WaitForSeconds(9.0); isExamineOnList=false; showExamine1=false; showBox1=true;}
function ExamineBox2(){
yield WaitForSeconds(9.0); isExamineOnList=false; showExamine2=false; showBox2=true;}
function KeyBox2(){
yield WaitForSeconds(3.0); showKey2=false; showBox2=true; }

I apologize for including all of my code but I have no idea what is wrong. The basis of what this is is that a for function detects if the typed phrase is on a list of keywords, and depending on the area, certain text boxes are put into use. However, particularly after typing an “examine” keyword, it will execute perfectly. The next code, however will not clear the previous text box, making 2 on the screen at once. The next detected phrase that is on the list will only clear the previous phrase, and then the game will function as normal. If the isExamineOnList of the bottom functions is removed, then the next text box will not even appear, going back to whatever the examine function was. From then on in that case, all keywords will lead to examine. Pictures of text box meshing:[29942-screen+shot+2014-07-28+at+6.43.04+pm.png|29942] (caused by examine and then exit, both text boxes with original room descriptions active)
[29943-screen+shot+2014-07-28+at+6.47.10+pm.png|29943] (mesh of get key text and normal box2 text performed after examine. This did resolve itself after the get key had 3 seconds pass).

This is a very weird bug and I would appreciate any help you could give.

EDIT: sorry for not formatting all of the text to code- resolved.

Fixed it myself and posting in case anyone else has this issue- made a variable(boolean) named stringSafety that would allow the normal text field if true and would disable it if it was false. Then, I just added it in to all the cofunctions. I found that for some reason, it would redo the original seconds that the examine and key text boxes would stay on screen and in that period, any inputs would cause odd effects like duplication of text boxes shown above. Therefore, I just would turn stringSafety to false during the problem period and then back to true at the end, allowing input. In addition, I found that my code would not reset, A.K.A. that if I typed in an exit keyword then deleted that and typed in an examine keyword, the exit keyword would take preference due to never being disabled. Therefore, I wrote that if the string was blank, all booleans for the is___OnList would be disabled. Code used:

  var stringSafety : boolean=true;
        
            	if (stringSafety==true){stringToEdit=GUI.TextField (Rect (19, 397, 600, 20), stringToEdit, 240, arcadeText);}
            
            	    if (stringSafety==false) {GUI.Box (Rect (19, 397, 600, 20), "CALCULATING...PLEASE WAIT", arcadeText);}
            	    if (stringToEdit=="") {isExamineOnList=false; isExitOnList=false; isKeyOnList=false;}
            
            Examine/Exit/Key functions edited:
            
                function ExamineBox1(){yield WaitForSeconds(8.0); isExamineOnList=false; showExamine1=false; showBox1=true; stringSafety=false; yield WaitForSeconds(8.0); stringSafety=true;} 
                function ExamineBox2(){
                yield WaitForSeconds(8.0); isExamineOnList=false; showExamine2=false; showBox2=true;stringSafety=false;yield WaitForSeconds(8.0); stringSafety=true;} 
                function KeyBox2(){
                yield WaitForSeconds(3.0);isKeyOnList=false; showKey2=false; showBox2=true; stringSafety=false; yield WaitForSeconds(3.0); stringSafety=true;} 

Hope this helps the small minority that have my exact problem!