fixed segfault due to relying on map-size