Mode change bugs fixed