fix bug in db worker