fixed a race in setup