Fix: if calls Close or Dispose many times it'll throws a NullReferenceException