fix agrs problems