Your error is in this:
You have only 1 selected item (which is the one clicked) - unless you're multiselecting you should always have 0 instead of lstUsers.SelectedIndex and even when multiselecting, unless you select ALL items this will break at some point.
Or alternatively use full list to select the one selected:
If this helps, please take time to accept the solution. Thank you.