Add 404 redirect on invalid state