Fixes index find bug