Added Close/Release handling.