Doesn't close other window after executing shell command