adding loop to terminate to wait for full destruction before proceeding