see if this prevents some race conditions