Fix crash (D2D release)