fix bug in index view