Fix crash due to bad destruction