Fixed threading issue for CTRL+X
Added Close for cmd.exe