Changed agent casts to use GetService instead.