Fixed a bug where the links didn't form properly when opening a saved diagram