CADMIUM-142 : updated 404 logic to work with multiple 404 pages