It was something stupid. I had placed the critical sections in the heap (each with one tokens store). IN THEORY this shouldn't be any problem because the usage would keep the critical section in memory, but hey, this is Windows(TM).
I put back the critical section to where it belonged, and voila.