Fixed a bug in unload_plugin_cmd that was causing a segfault.