fix thread starvation, observe race condition