fix a bug in TestPlugin