fixed some bugs on plugin install