fix test code path