fixed code to properly create DLLs