added 404 middleware.