fixing db for qi