search removed, and entity dist bug fixed