sample_store: Fix erase logic