selectedObjects were erased while being iterated