Fixes issue with ordering of scan agent tasks.