Fix compatibility with thresholds