Fixed crash in matedit.