do not use foreach when removing objects.