added a 404 header when the mode selected isn't valid.