Dynamic assembly exception

Fixed a problem with dynamic assemblies when initializing entity manager
for the first time.