Fix the crash in Textrue2dTest