segfault fixed, the map was not initialised with null pointers