Code mostly works. SynopsisSpec intermittently fails (race condition?)