fixes to get agreements to create correctly