Fixed issues with dll copying.