Add special cases for long and short paths