BUG: inconsistency in mask usage