fix bug with ivs
Merge pull request #15 from Sarkynin/patch-1

fix bug with ivs