further mask confusion fixes issue #26