clean up for building with plugins
fix error