fix bug with ivs