merging the destroy method fix onto this branch