Enhance plugin, fix some minor bug.