Fix crash in reading context menu.