some fixes - for the agent