I have the same problem few days ago. Already applied many ways but not fixed that problem. Finally, I accidentally recognized that problem caused by user's permission. The problem was solved when I run it under administrative role. Hope that helps.