Improve console command handling.