Fixing up references to elements and element ids

Searching in linked selectboxes was broken