Fixes to make tests run properly.