Changed minimum distToStack from 0 to 1.