fixed race condition on gc marking