fix global map leak