Fixes regex bug when location_id is array