agent bug fix