fix double headers send on 404

fixes 404 handler, removing a broken middleware.