-fix a bug in the Main.java file when give the -g switch that caused an
infinite loop that kept opening GUI windows