Fixed destroy code.