adding functionality to not switch back to target pane