Added proper closing