fixed bugs in Agent and SystemDataCollector classes.