fixed more for invalid mode/terminal