Bit of a hack for 404 redirect handling.