Fix an issue where the 'Show basic information' would be completely ignored after loading a new script
Fix a newly introduced exception thrown when generating comments after loading a script. The selection would be lost after loading a script, resulting in SelectedItem[0] throwing an exception