Minor fix in the location method