fixed bug,loc should not be added without WITH_AD3