Fix race condition on Mask show/hide operations
Race condition tests