Fixed hang when deleting lots of samples