converter: fix some race conditions