   THEN
     RAISE NOTICE 'No boundaries found for bounding box ''%'' in ''%''', ST_AsText(geom), boundary_id;
     RETURN QUERY SELECT NULL::geometry, NULL::text;
+    RETURN;
   END IF;
 
   RAISE NOTICE 'target_table: %', target_table;

     WHERE ST_%s($1, the_geom)
     ', geom_colname, geom_colname, geoid_colname, target_table, overlap_type)
  USING geom;

END;
$$ LANGUAGE plpgsql;

  THEN
    RAISE NOTICE 'No boundaries found for bounding box ''%'' in ''%''', ST_AsText(geom), boundary_id;
    RETURN QUERY SELECT NULL::geometry, NULL::text;
    RETURN;
  END IF;

  RAISE NOTICE 'target_table: %', target_table;
