Hax to fix test termination bugs