Fix hanging when the list of contacts changes