Updated the threshold mask to the latest version from Toms branch.