fixed concurrency bug with global_last mems #2