Added locality check