Made changes to deleting the container from list of containers in the session

Just searched through the list and did a splice at the location
When could `i` equal `-1`?