Improve error messages in AGREE