Pointer error was a non properly initialized map