history

we need to make sure that every edit releases properly its history when it's deleted, otherwise we end up having a segfault