Fix crash in map