Added close functions