Added close check