Bug fixes

Fixed a number of menu bugs that were causing infinite loops or pausing
or crashing the program.  overall stability greatly improved.