Fix an exception thrown when reconnecting, caused by previous commit
Only attempt to load a script on expanding finished, instead of both contracting and expanding
Fix an issue where FinishedExpandingOrContracting would always be called twice when it should only be called once. Fixes duplicates in the listview on expanding finished