Fix some test context issues