Fix mask id conflict