Fix wrong ID reference for elements search.