fix bug in simple index