Fix deleting case that is not last one