context fixes for tests