* fixed race conditions