minor fix for mask reuse