This also allows for the sheet to automatically close, should the command exit before the user selects an action.