agent: Fixing problems with broken patch.