fixed bug with CI calculation