Fixed d3d
Cleanup