More hacks to make tests work.