Update quit_scanner method

Free memory then switch to next list