more d3d fixes