Fix crash on freeing map value.