Graphics device reset crash/hang fixes.