Fixed two-level thresholding test, but it should probably be expanded for better coverage.