Added proper clean up