Various minor changes, including one potential concurrency fix