add comments for middleware packages, fix typo error