a lot of fixes and improvments for agency section