fixed self deleting bug