Fixed sample removal bug.