fixed double save bug (pointerMap.clear())