if last scratch is deleted, open default
Merge pull request #11 from krasa/proper-rewrite-fix

 if last scratch is deleted, open default