Fixed a null pointer exception during plugin enabling.