fix exception on loading dlls