Fixed synchronization issue with destroy