resolve null ref.