Fix map clearing