fixed race condition in get_db