Fix destroy order, thanks @fvanderbiest. closes #2