fixed issue #401. remove listeners when scan manager closes and don't update magnet if detector is none