Made inv default to previously selected row when the dialog is refreshed