minor fix in code generator

fixed "unresolved symbol" error

build fix

fixed plugin loader logic