[Addon] Fix a bug with the CopySession() function