removed unused code
correctly handle product closing