Better handling of deleted samples