fixed locate bug....there is still a big bug somewhere.