delete first, check for orphans later
Merge pull request #50 from tpluscode/delete-commit-bug

delete first, check for orphans later