Some bug fixes to get Anya import to work.