fix a bug in console control