Corrected the tiling routine. When applying the threshold, the first tile was skipped.