fix seg fault with uninitialized map