Changed cursor%indx to cursor%idx cause I felt like it