fixed asserts in _Attach