Fix old request task agent

Fix for considering only submitted tasks