Fixes scheduled scan and scan agent task