Self-reference fix

fixes crash situations