Fixed wrong destroy func