fix the localize bug