Fix a newly introduced issue where the database would not be used in this session upon pressing the Connect button.