fix #2391: NPE in map