fixed small issue concerning reusing agents