Fixed bug modules override

I think this will reverse your paths on each loop, I think you should add that after foreach