fixed getPlugin method