Added destructor for more robustness