recursive mod search fix