Fix direction, use of variable for stub threshold