fixed a bug in the garbage collection of access tokens