Fixed a mistake in plugins code