fixed bug with destroy