fixed a bug in test_plugins