Fix a bug where metabolites would be bugged after a lot of undo en redo