Fixing dll references and dependencies.