Fix error in the way we terminate workers when 404 is found.