Fix bugs + load PermanantData complete

* ! std::function didn't work correctly with dynamic load of dynamic
library.