fix locality problem