Improve plugin loading by better classname check