fix delay for destroy function