remove null reference exception