fixed ki bug