Fix ams tests