Added optional stabilization to threshold