Improve parsing of MODE, prevent logging in from locking up GUI.