Fixed a typo in the destroy() function