fix destroy logic