fixed issue with item index