Localhost exception fixes for threading tests