Change mask construction
Don't block database during construction