Added a closed property and support it now with attach as well.