Dynamo Bug: Addition of input/output connection nodes when reloading script

After doing some research I found these links:

Dynamo 2.0 duplicates ports of custom node when file is saved and reopened? - Developers - Dynamo (dynamobim.com)

But it is not clear to me how to fix this bug. Could anyone explain what I have to do?