I've adjusted thresholds experimentally. It now seems to work!