Fix NilClass on long paths