Token release during perl script

Hi everyone,

I use a perl script to do multiple MD steps after which I do a geometry optimization with CASTEP.

I have the problem, that Tokens used by the MD are not released after completion of the MD-steps, but are still occupied by Forcite.

Is there a Perl script command with which I can release those Tokens?