fix template loading in tests