logic fixes on agenet request