Searches now end correctly