Cursor index out of bounds fixed.