fix compile error and warning.
fix bug at the Console::insertStringToTerminal