Fix bug on destruction of class.
Merge commit '241757e'