Fixes race condition in BitcoinUtil