Changed to a better means of searching, in so doing fixing the silly error with semi-duplicate ids