Fix for viewer crashing after closing and reopening without changing selections.