fixed bug with calculating ags rates