fix bug where you can't delete last version