Fix focus issue in command line mode (#218).