Bug fixes in locate and return
Bug fixes in locate and return