Fix iv queries