Bugfix: 1) null pointer for bid, 2) cuncorrent modification exception