Fix/3.0/issue 685

fixes the issue 685.
indexes were not cleared on map.clear()