prevent "pseudo race condition"