Changed mask computation.