Fix performance of locate and acd