terminal: use the right api to remove the panel item