fix NoMethodError on press Ctrl+D