bugfix in IsClosed