Adding fix for agency migrations.